<?php

@session_start();
//set_time_limit(0);

/* databse login details for localhost 
define("DB_HOST", "localhost");
define("DB_USERNAME", "root");
define("DB_PASSWORD", "");
define("DB_NAME", "HBMS"); */

/* databse login details for systech server */
define("DB_HOST", "localhost");
define("DB_USERNAME", "showandt_tphbm");
define("DB_PASSWORD", "gohbm");
define("DB_NAME", "showandt_HBM");


$connect = mysql_connect(DB_HOST, DB_USERNAME, DB_PASSWORD);
if (!$connect) {
    $_SESSION['error'] = 'Could not connect: ' . mysql_error();
	header("location:error.php");
	
}

$database = mysql_select_db(DB_NAME);



if (!$database) {
    $_SESSION['error'] = 'No database selected';
	header("location:error.php");
	
}
/*
mysql_query("ALTER TABLE `tbl_users` ADD `text_alert` TINYINT( 2 ) NOT NULL DEFAULT '1' COMMENT '0 = Off , 1= On' AFTER `is_admin` ,
ADD `email_alert` TINYINT( 2 ) NOT NULL DEFAULT '1' COMMENT '0 = Off , 1= On' AFTER `text_alert`") or die(mysql_error());

mysql_query("ALTER TABLE `tbl_log_message` ADD `is_sent` TINYINT( 2 ) NOT NULL DEFAULT '1' COMMENT '0 = message sent, 1 = message not sent'") or die(mysql_error()); 
*/
mysql_query("update tbl_log_message set is_sent = 1") or die(mysql_error());

?>
